#ifndef  _CONTROL_H
#define  _CONTROL_H


#include "encoder.h"
#include "motor.h"
#include "pwm.h"

#include "delay.h"
#include "OLED.h"

#include "exti.h"
#include "mpu6050.h"
#include "inv_mpu.h"
#include "inv_mpu_dmp_motion_driver.h"
#include "sys.h" 


extern int PWM_MAX,PWM_MIN;
extern int zuo,you;
extern float Pitch,Roll,Yaw;		
extern short gyrox,gyroy,gyroz;	
extern short aacx,aacy,aacz;		
extern int Encoder_Left,Encoder_Right;



int Vertical(float Med,float Angle,float gyro_Y);
int Velocity(int Target,int encoder_left,int encoder_right);
int Turn(int gyro_Z);
void EXTI9_5_IRQHandler(void);
#endif

